import { h, render } from 'vue'
import messageComponent from './index.vue'
export const message = (type, content, duration = 2000) => {

    const onDistory = () => {
        render(null, document.body)
    }
    const vnode = h(messageComponent, {
        content,
        type,
        duration,
        distory: onDistory
    })
    render(vnode, document.body)
}